<!DOCTYPE html>
<html>
<head>
<title>CSS Test: GCPM Target Counter</title>
<link rel="author" title="Dave Cramer" href="mailto:dauwhe@gmail.com">
<link rel="help" href="http://www.w3.org/TR/css3-gcpm/#target-counter">
<meta name="flags" content="paged">
<meta name="assert" content="Test checks that a simple target counter works">

<style>
  
  #page2 { page-break-before: always; }
  

a::after { content: 'page ' target-counter(attr(href), page);
}

a { text-decoration: none; color: black; }
 
</style>
</head>
<body>

<p>Test pass if the next sentence reads "The last page of this document is page 2."</p>

<p>The last page of this document is <a href="#page2"></a>.</p>

<p id="page2">Here is the last page.</p>

</body>
</html>